<!DOCTYPE html>

<head>
	<meta charset="utf-8">
	<meta name="renderer" content="webkit">
	<meta name="viewport" content="width=device-width, initial-scale=1.0">
	<title>主题选择</title>
	<link rel="stylesheet" href="../../static/favicon.ico" />
	<link rel="stylesheet" href="../../lib/bootstrap/css/bootstrap.min.css">
	<link rel="stylesheet" href="../../static/css/style.css">
	<link rel="stylesheet" href="../../static/css/skins.css">
	<style type="text/css">
		.list-unstyled {
			margin: 10px;
		}

		.full-opacity-hover {
			opacity: 1;
			filter: alpha(opacity=1);
			border: 1px solid #fff
		}

		.full-opacity-hover:hover {
			border: 1px solid #f00;
		}
	</style>
</head>

<body class="gray-bg skin-blue">
	<ul class="list-unstyled clearfix">
		<li style="float:left; width: 33.33333%; padding: 5px;">
			<a href="javascript:" data-skin="skin-blue|theme-dark" style="display: block; box-shadow: 0 0 3px rgba(0,0,0,0.4)"
				class="clearfix full-opacity-hover">
				<span style="width: 20%; float: left; height: 13px; background: #367fa9"></span>
				<span style="width: 80%; float: left; height: 13px; background: #3c8dbc"></span>
				<span style="width: 20%; float: left; height: 30px; background: #2f4050"></span>
				<span style="width: 80%; float: left; height: 30px; background: #f4f5f7"></span>
			</a>
			<p class="text-center">蓝</p>
		</li>

		<li style="float:left; width: 33.33333%; padding: 5px;">
			<a href="javascript:" data-skin="skin-green|theme-dark"
				style="display: block; box-shadow: 0 0 3px rgba(0,0,0,0.4)" class="clearfix full-opacity-hover">
				<span style="width: 20%; float: left; height: 13px; background: #008d4c"></span>
				<span style="width: 80%; float: left; height: 13px; background: #00a65a"></span>
				<span style="width: 20%; float: left; height: 30px; background: #222d32"></span>
				<span style="width: 80%; float: left; height: 30px; background: #f4f5f7"></span>
			</a>
			<p class="text-center">绿</p>
		</li>

		<li style="float:left; width: 33.33333%; padding: 5px;">
			<a href="javascript:" data-skin="skin-purple|theme-dark"
				style="display: block; box-shadow: 0 0 3px rgba(0,0,0,0.4)" class="clearfix full-opacity-hover">
				<span style="width: 20%; float: left; height: 13px; background: #555299"></span>
				<span style="width: 80%; float: left; height: 13px; background: #605ca8"></span>
				<span style="width: 20%; float: left; height: 30px; background: #222d32"></span>
				<span style="width: 80%; float: left; height: 30px; background: #f4f5f7"></span>
			</a>
			<p class="text-center">紫</p>
		</li>

		<li style="float:left; width: 33.33333%; padding: 5px;">
			<a href="javascript:" data-skin="skin-red|theme-dark" style="display: block; box-shadow: 0 0 3px rgba(0,0,0,0.4)"
				class="clearfix full-opacity-hover">
				<span style="width: 20%; float: left; height: 13px; background: #dd4b39"></span>
				<span style="width: 80%; float: left; height: 13px; background: #d73925"></span>
				<span style="width: 20%; float: left; height: 30px; background: #222d32"></span>
				<span style="width: 80%; float: left; height: 30px; background: #f4f5f7"></span>
			</a>
			<p class="text-center">红</p>
		</li>

		<li style="float:left; width: 33.33333%; padding: 5px;">
			<a href="javascript:" data-skin="skin-yellow|theme-dark"
				style="display: block; box-shadow: 0 0 3px rgba(0,0,0,0.4)" class="clearfix full-opacity-hover">
				<span style="width: 20%; float: left; height: 13px; background: #f39c12"></span>
				<span style="width: 80%; float: left; height: 13px; background: #e08e0b"></span>
				<span style="width: 20%; float: left; height: 30px; background: #222d32"></span>
				<span style="width: 80%; float: left; height: 30px; background: #f4f5f7"></span>
			</a>
			<p class="text-center">黄</p>
		</li>

		<li style="float:left; width: 33.33333%; padding: 5px;">
			<a href="javascript:" data-skin="skin-blue|theme-light"
				style="display: block; box-shadow: 0 0 3px rgba(0,0,0,0.4)" class="clearfix full-opacity-hover">
				<span style="width: 20%; float: left; height: 13px; background: #367fa9"></span>
				<span style="width: 80%; float: left; height: 13px; background: #3c8dbc"></span>
				<span style="width: 20%; float: left; height: 30px; background: #f9fafc"></span>
				<span style="width: 80%; float: left; height: 30px; background: #f4f5f7"></span>
			</a>
			<p class="text-center">蓝灰</p>
		</li>

		<li style="float:left; width: 33.33333%; padding: 5px;">
			<a href="javascript:" data-skin="skin-green|theme-light"
				style="display: block; box-shadow: 0 0 3px rgba(0,0,0,0.4)" class="clearfix full-opacity-hover">
				<span style="width: 20%; float: left; height: 13px; background: #008d4c"></span>
				<span style="width: 80%; float: left; height: 13px; background: #00a65a"></span>
				<span style="width: 20%; float: left; height: 30px; background: #f9fafc"></span>
				<span style="width: 80%; float: left; height: 30px; background: #f4f5f7"></span>
			</a>
			<p class="text-center">绿灰</p>
		</li>

		<li style="float:left; width: 33.33333%; padding: 5px;">
			<a href="javascript:" data-skin="skin-purple|theme-light"
				style="display: block; box-shadow: 0 0 3px rgba(0,0,0,0.4)" class="clearfix full-opacity-hover">
				<span style="width: 20%; float: left; height: 13px; background: #555299"></span>
				<span style="width: 80%; float: left; height: 13px; background: #605ca8"></span>
				<span style="width: 20%; float: left; height: 30px; background: #f9fafc"></span>
				<span style="width: 80%; float: left; height: 30px; background: #f4f5f7"></span>
			</a>
			<p class="text-center">紫灰</p>
		</li>

		<li style="float:left; width: 33.33333%; padding: 5px;">
			<a href="javascript:" data-skin="skin-red|theme-light" style="display: block; box-shadow: 0 0 3px rgba(0,0,0,0.4)"
				class="clearfix full-opacity-hover">
				<span style="width: 20%; float: left; height: 13px; background: #dd4b39"></span>
				<span style="width: 80%; float: left; height: 13px; background: #d73925"></span>
				<span style="width: 20%; float: left; height: 30px; background: #f9fafc"></span>
				<span style="width: 80%; float: left; height: 30px; background: #f4f5f7"></span>
			</a>
			<p class="text-center">红灰</p>
		</li>

		<li style="float:left; width: 33.33333%; padding: 5px;">
			<a href="javascript:" data-skin="skin-yellow|theme-light"
				style="display: block; box-shadow: 0 0 3px rgba(0,0,0,0.4)" class="clearfix full-opacity-hover">
				<span style="width: 20%; float: left; height: 13px; background: #f39c12"></span>
				<span style="width: 80%; float: left; height: 13px; background: #e08e0b"></span>
				<span style="width: 20%; float: left; height: 30px; background: #f9fafc"></span>
				<span style="width: 80%; float: left; height: 30px; background: #f4f5f7"></span>
			</a>
			<p class="text-center">黄灰</p>
		</li>
	</ul>
</body>
<script type="text/javascript" src="../../static/js/jquery.min.js"></script>
<script type="text/javascript" src="../../static/js/common.js"></script>
<script type="text/javascript" src="../../lib/xe-ajax/xe-ajax.js"></script>
<script type="text/javascript" src="../../static/js/webApi.js"></script>
<script type="text/javascript">
	window.onload = function () {
		//皮肤样式列表
		var skins = ["skin-blue", "skin-green", "skin-purple", "skin-red", "skin-yellow"];
		// 主题样式列表
		var themes = ["theme-dark", "theme-light"];
		$("[data-skin]").on('click', function (e) {
			var skin = $(this).data('skin');
			let params = Object.assign({
				// user_SKIN: skin
				userSkin:skin
			});
			webApi('/users/modifySkin', 'post', params, function (data) {
				if (data.code == 200) {
					$.each(skins, function (i) {
						parent.$("body").removeClass(skins[i]);
					});
					$.each(themes, function (i) {
						parent.$("body").removeClass(themes[i]);
					});
					parent.$("body").addClass(skin.split('|')[0]);
					parent.$("body").addClass(skin.split('|')[
						1]);
					storage.set('skin', skin);
					//parent.layer.closeAll();
				} else {
					return false;
				}
			});
		});
	}
</script>

</html>